package com.jrzn.view;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

import com.nsjr.jrznandroid.R;

/**
 * Created by haokai on 2016/5/19.
 */
public class CautionAlertdialog extends AlertDialog {
    private String mMsg = "Loading";
    private View view;


    public CautionAlertdialog(Context context,String message) {
        super(context);
        this.mMsg=message;
    }

    protected CautionAlertdialog(Context context, int theme) {
        super(context, theme);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_view);
        TextView tvmessagee=(TextView)findViewById(R.id.tv_dialog_message);
        tvmessagee.setText(mMsg);
        TextView tvbutton=(TextView)findViewById(R.id.tv_queding);
        tvbutton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
    }
}
